////////////////////////////////////////////////////////////////////////////
//
//  CryEngine Source File.
//  Copyright (C), Crytek, 1999-2010.
// -------------------------------------------------------------------------
//  File name:	IAssetViewer.h
//  Version:	v1.00
//  Created:	19/08/2008 by Paulo Zaffari
//  Description:	This file declares a control which objective is to display 
//								multiple assets allowing selection and preview of such things.
//								It also handles scrolling and changes in the thumbnail display size
// -------------------------------------------------------------------------  
//  History:
//		19/08/2008 - Paulo Zaffari - created
//		11/03/2010 - Nicusor Nedelcu - refactored
//////////////////////////////////////////////////////////////////////////// 

#ifndef __IAssetViewer_h__
#define __IAssetViewer_h__
#pragma once

#include "IObservable.h"

struct IAssetDisplay;
struct IAssetDisplayDatabase;

// Description:
//		Observer for the asset viewer events
struct IAssetViewerObserver
{
	virtual void OnChangeStatusBarInfo( UINT nSelectedItems, UINT nVisibleItems, UINT nTotalItems ){};
	virtual void OnSelectionChanged(){};
	virtual void OnChangedPreviewedAsset( IAssetDisplay* pAsset ){};
};

// Description:
//		The asset viewer interface for the asset database plugins to use
struct IAssetViewer
{
	DEFINE_OBSERVABLE_PURE_METHODS( IAssetViewerObserver );

	virtual HWND	GetRenderWindow() = 0;
	// this will push the asset into the cache for thumbnail, and if it will not fit, then it will discard/uncache the oldest asset thumbnail
	virtual void	PushToThumbsCacheQueue( IAssetDisplay* pAsset ) = 0;
};

#endif // __IAssetViewer_h__